/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pb138.mathml_canonicalizator;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 *
 * @author Pepko
 */
public class WriteStringtoFile {

    /*
     * Method stringToFile transforms given string to XML file located in 'src/tmp.xml'.
     * 
     * @param String string is string we want to trnasform to XML file
     * @return void.
     */
    public void stringToFile(String string) {

        BufferedWriter writer = null;
        try {
            writer = new BufferedWriter(new FileWriter("/tmp.xml"));
            writer.write(string);

        } catch (IOException e) {
        } finally {
            try {
                if (writer != null) {
                    writer.close();
                }
            } catch (IOException e) {
            }
        }
    }
}
